g_message ("volume changed to %f", volume);
}
-static void
-toggle_orientation (GtkWidget *button,
- GtkWidget *scalebutton)
-{
- if (gtk_orientable_get_orientation (GTK_ORIENTABLE (scalebutton)) ==
- GTK_ORIENTATION_HORIZONTAL)
- {
- gtk_orientable_set_orientation (GTK_ORIENTABLE (scalebutton),
- GTK_ORIENTATION_VERTICAL);
- }
- else
- {
- gtk_orientable_set_orientation (GTK_ORIENTABLE (scalebutton),
- GTK_ORIENTATION_HORIZONTAL);
- }
-}
-
static void
response_cb (GtkDialog *dialog,
gint arg1,
GtkWidget *window;
GtkWidget *button;
GtkWidget *button2;
- GtkWidget *button3;
GtkWidget *box;
GtkWidget *vbox;
gtk_container_add (GTK_CONTAINER (box), button);
gtk_container_add (GTK_CONTAINER (box), button2);
- button3 = gtk_button_new_with_label ("Toggle orientation");
- gtk_container_add (GTK_CONTAINER (box), button3);
-
- g_signal_connect (G_OBJECT (button3), "clicked",
- G_CALLBACK (toggle_orientation),
- button);
- g_signal_connect (G_OBJECT (button3), "clicked",
- G_CALLBACK (toggle_orientation),
- button2);
-
gtk_widget_show (window);
- g_signal_emit_by_name (button, "clicked");
g_timeout_add (4000, (GSourceFunc) show_error, window);
while (TRUE)